import React ,{Component} from 'react'
import {
    View,
    StyleSheet,
    Text,
    SafeAreaView,
    TouchableOpacity,
} from 'react-native';
export default class TestPage extends Component {

    constructor(props){
        super(props);
        this.state = {
            name :'', // 名字
        };
    }

    render(){
        return (
            <View style={styles.container}>
                <SafeAreaView >
                    <TouchableOpacity style={styles.button} onPress={() => this._goDetail()}>
                        <Text style={styles.buttonText}>详情</Text>
                    </TouchableOpacity>
                </SafeAreaView>
            </View>
        )
    }
  
    _goDetail(){
        this.props.navigation.navigate('TestDetailPage', {
            title: '测试详情'
        })

    }

}


const styles = StyleSheet.create({
    container: {
        flex: 1,
        backgroundColor: '#E2E2E2',
        justifyContent:'center',
        alignItems:'center',
       
    },
    button:{
        width:100,
        height:50,
        backgroundColor: '#FFFF00',
        justifyContent:'center',
        alignItems:'center',
        marginBottom:10,
    }

});
